<template>
  <!-- 顶部通栏组件 -->
  <nav class="navbar navbar-inverse">
    <a class="navbar-brand" href="#">WMS管理系统</a>
<!--    <el-button type="primary" class="btn" @click="clicklogin">登录</el-button>-->
    <el-button type="primary" class="btn" @click="clicklogout">登出</el-button>
  </nav>

</template>


<script>
  export default {
    name: 'NavBar',
    methods:{
      clicklogin(){
        this.$router.replace('/login')
      },
      clicklogout(){
        sessionStorage.clear();
        var storage = window.localStorage;
        storage.clear()
        this.$router.replace('/login')
      },
    }
  }
</script>
<style>
  .btn{
    position: absolute;
    top: 10px;
    right: 30px;
  }
  /*.navbar{*/
  /*  margin-bottom: 0px;*/
  /*  border-radius: 5px;*/
  /*  background: #337ab7;*/
  /*}*/
</style>
